package com.gxjc.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import com.gxjc.dao.bean.RoleDao;
import com.gxjc.model.Role;
@Transactional
public class RoleService {
	@Autowired
	RoleDao roleDao;
	public List<Role> getAll(){
		return roleDao.getAll();	
	}
	
	public void save(Role role) {
		roleDao.save(role);
	}
	
	public void delete(int id) {
		roleDao.delete(id);
	}
	
	public Role getRoleById(int id) {
		return (Role)roleDao.getRoleById(id);
	}
	public List<Role> getRoleBySql(String sql) {
		return roleDao.getRoleBySql(sql);
	}
	public void update(Role role) {
		roleDao.update(role);
	}
	//get and set

	public RoleDao getRoleDao() {
		return roleDao;
	}

	public void setRoleDao(RoleDao roleDao) {
		this.roleDao = roleDao;
	}
	
	
}
